
const Emp = require('../models/Emp.js');

Emp.findAll()
.then( rows => rows.map( row => row.dataValues ) )
.then( emps => {
    emps.forEach( (e,i) => {
        console.log( i , e );
    });
    console.log( '- '.repeat(20) );
});

Emp.findByPk(1)
.then( row => row.dataValues )
.then( emp => console.log( emp ) );

Emp.findOne({
    where: {
        name: '赵敏'
    }
}).then( one => {
    console.log( one );
    return one.dataValues;
}).then( emp => console.log( emp ) );